<?php
    $GLOBALS['base_url'] = $_SERVER["HTTP_HOST"];
    if (!isset($_SESSION['lib_game']))
    {
        $_SESSION["lib_game"] = "briggsoft";
    }
    $h_config = array();
    //************* DATABASE
    $h_config['server'] = 'localhost';
    $h_config['username'] = 'root';
    $h_config['password'] = '';
    $h_config['database'] = 'game4fun';
    
    //************* GAMES
    $h_config["active_code"] = "briggsoft";
    $h_config["briggsoft"]["base_url"] = "http://game4fun.test";
    $h_config["briggsoft"]["server_url"] = $h_config["briggsoft"]["base_url"] . ":8087";
    $h_config["briggsoft"]["api_url"] = $h_config["briggsoft"]["server_url"] . "/api";
    $h_config["briggsoft"]["api_pass"] = "123456";
    $h_config["briggsoft"]["avatar"] = $h_config["briggsoft"]["server_url"]."/Image?Name=Avatars";
    $h_config["briggsoft"]["avatarmax"] = 64;
    
    $h_config["base_url"] = $h_config[$_SESSION["lib_game"]]["base_url"];
    $h_config["server_url"] = $h_config[$_SESSION["lib_game"]]["server_url"];
    $h_config["api_url"] = $h_config[$_SESSION["lib_game"]]["api_url"];
    $h_config["api_pass"] = $h_config[$_SESSION["lib_game"]]["api_pass"];
    $h_config["avatar"] = $h_config[$_SESSION["lib_game"]]["avatar"];
    $h_config["avatarmax"] = $h_config[$_SESSION["lib_game"]]["avatarmax"];
    
    
    
    
    //function setActiveConfig($active_code)
//    {
//        global $h_config;
//        $_SESSION["lib_game"] = $active_code;
//        $h_config["active_code"] = $_SESSION["lib_game"];
//        $h_config["base_url"] = $h_config[$_SESSION["lib_game"]]["base_url"];
//        $h_config["server_url"] = $h_config[$_SESSION["lib_game"]]["server_url"];
//        $h_config["api_url"] = $h_config[$_SESSION["lib_game"]]["api_url"];
//        $h_config["api_pass"] = $h_config[$_SESSION["lib_game"]]["api_pass"];
//        $h_config["avatar"] = $h_config[$_SESSION["lib_game"]]["avatar"];
//        $h_config["avatarmax"] = $h_config[$_SESSION["lib_game"]]["avatarmax"];
//    }
    
    
?>